
import 'package:dk_flutter_module_sale/phoenix/tools/bean/bean_tools_item.dart';

class WorkHomeBean {
  CommontoolBean commontool;
  TodoModule todoModule;
  InformationsBean informations;
  List<UpdateModuleListBean> updateModule;
  WorkHomeBean({this.commontool,this.todoModule,this.updateModule,this.informations});
  WorkHomeBean.fromJson(Map<String, dynamic> json) {
    todoModule = json['todoModule'] != null ? new TodoModule.fromJson(json['todoModule']) : null;
    this.commontool = json['commontool'] != null ? CommontoolBean.fromJson(json['commontool']) : null;
    this.informations = json['informations'] != null ? InformationsBean.fromJson(json['informations']) : null;
    this.updateModule = (json['updateModule'] as List)!=null?(json['updateModule'] as List).map((i) => UpdateModuleListBean.fromJson(i)).toList():null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();

      if (this.commontool != null) {
      data['commontool'] = this.commontool.toJson();
    }

   if (this.todoModule != null) {
      data['todoModule'] = this.todoModule.toJson();
    }

   data['updateModule'] = this.updateModule != null?this.updateModule.map((i) => i.toJson()).toList():null;

    if (this.informations != null) {
      data['informations'] = this.informations.toJson();
    }

    return data;
  }

}

class CommontoolBean {
  String appRouteUrl;
  String title;
  int moduleType;
  List<ToolsItem> list;

  CommontoolBean({this.appRouteUrl, this.title, this.moduleType, this.list});

  CommontoolBean.fromJson(Map<String, dynamic> json) {
    this.appRouteUrl = json['appRouteUrl'];
    this.title = json['title'];
    this.moduleType = json['moduleType'];
    this.list = (json['list'] as List)!=null?(json['list'] as List).map((i) => ToolsItem.fromJson(i)).toList():null;

  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['appRouteUrl'] = this.appRouteUrl;
    data['title'] = this.title;
    data['moduleType'] = this.moduleType;
    data['list'] = this.list != null?this.list.map((i) => i.toJson()).toList():null;
    return data;
  }
}

class InformationsBean {

  int moduleType;
  List<ItemsListBean> items;
  InformationsBean({this.moduleType, this.items});

  InformationsBean.fromJson(Map<String, dynamic> json) {
    this.moduleType = json['moduleType'];
    this.items = (json['items'] as List)!=null?(json['items'] as List).map((i) => ItemsListBean.fromJson(i)).toList():null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['moduleType'] = this.moduleType;
    data['items'] = this.items != null?this.items.map((i) => i.toJson()).toList():null;
    return data;
  }
}

class UpdateModuleListBean {
  String hostUrl;
  String title;
  int moduleType;

  UpdateModuleListBean({this.hostUrl, this.title, this.moduleType});

  UpdateModuleListBean.fromJson(Map<String, dynamic> json) {
    this.hostUrl = json['hostUrl'];
    this.title = json['title'];
    this.moduleType = json['moduleType'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['hostUrl'] = this.hostUrl;
    data['title'] = this.title;
    data['moduleType'] = this.moduleType;
    return data;
  }
}

class ItemsListBean {
  String appRouteUrl;
  String categoryName;
  String categoryId;
  List<AppArticleVosListBean> appArticleVos;

  ItemsListBean({this.appRouteUrl, this.categoryName, this.categoryId, this.appArticleVos});

  ItemsListBean.fromJson(Map<String, dynamic> json) {
    this.appRouteUrl = json['appRouteUrl'];
    this.categoryName = json['categoryName'];
    this.categoryId = json['categoryId'];
    this.appArticleVos = (json['appArticleVos'] as List)!=null?(json['appArticleVos'] as List).map((i) => AppArticleVosListBean.fromJson(i)).toList():null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['appRouteUrl'] = this.appRouteUrl;
    data['categoryName'] = this.categoryName;
    data['categoryId'] = this.categoryId;
    data['appArticleVos'] = this.appArticleVos != null?this.appArticleVos.map((i) => i.toJson()).toList():null;
    return data;
  }
}

class AppArticleVosListBean {
  String appRouteUrl;
  String coverImageUrl;
  String pushDate;
  String title;
  String content;

  AppArticleVosListBean(
      {this.appRouteUrl, this.coverImageUrl, this.pushDate, this.title, this.content});

  AppArticleVosListBean.fromJson(Map<String, dynamic> json) {
    this.appRouteUrl = json['appRouteUrl'];
    this.coverImageUrl = json['coverImageUrl'];
    this.pushDate = json['pushDate'];
    this.title = json['title'];
    this.content = json['content'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['appRouteUrl'] = this.appRouteUrl;
    data['coverImageUrl'] = this.coverImageUrl;
    data['pushDate'] = this.pushDate;
    data['title'] = this.title;
    data['content'] = this.content;
    return data;
  }
}

class TodoModule {
  int moduleType;
  String title;
  TodoItemListBean items;
  TodoModule({this.moduleType, this.title, this.items});
  TodoModule.fromJson(Map<String, dynamic> json) {
    moduleType = json['moduleType'];
    title = json['title'];
    items = json['items'] != null ? new TodoItemListBean.fromJson(json['items']) : null;
  }
  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['moduleType'] = this.moduleType;
    data['title'] = this.title;
    if (this.items != null) {
      data['items'] = this.items.toJson();
    }
    return data;
  }
}


class TodoItemListBean {
  String appRouteUrl;
  int total;
   List<TodoItem> list;
  TodoItemListBean({this.appRouteUrl, this.total, this.list});

  TodoItemListBean.fromJson(Map<String, dynamic> json) {
    appRouteUrl = json['appRouteUrl'];
    total = json['total'];
    this.list = (json['list'] as List)!=null?(json['list'] as List).map((i) => TodoItem.fromJson(i)).toList():null;
  }
  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['appRouteUrl'] = this.appRouteUrl;
    data['total'] = this.total;
    data['list'] = this.list != null?this.list.map((i) => i.toJson()).toList():null;
    return data;
  }
}

class TodoItem {
  String appRouteUrl;
  String appSubmitDatetime;
  String billTypeName;
  String processStatus;
  String departName;
  String businessCode;
  String processStatusColor;
  String staffName;

  TodoItem(
      {this.appRouteUrl,
        this.appSubmitDatetime,
        this.billTypeName,
        this.processStatus,
        this.departName,
        this.businessCode,
        this.processStatusColor,
        this.staffName});

  TodoItem.fromJson(Map<String, dynamic> json) {
    appRouteUrl = json['appRouteUrl'];
    appSubmitDatetime = json['appSubmitDatetime'];
    billTypeName = json['billTypeName'];
    processStatus = json['processStatus'];
    departName = json['departName'];
    businessCode = json['businessCode'];
    processStatusColor = json['processStatusColor'];
    staffName = json['staffName'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['appRouteUrl'] = this.appRouteUrl;
    data['appSubmitDatetime'] = this.appSubmitDatetime;
    data['billTypeName'] = this.billTypeName;
    data['processStatus'] = this.processStatus;
    data['departName'] = this.departName;
    data['businessCode'] = this.businessCode;
    data['processStatusColor'] = this.processStatusColor;
    data['staffName'] = this.staffName;
    return data;
  }
}






